class PurchaseCodeController < ApplicationController
  def validate
    respond_to do |format|
      code = PurchaseCode.all code: params[:c]
      json = { ok: code.length > 0 }
      format.json { render json: json }
    end
  end

end
